/**
 * 
 */
package pojo;

/**
 * @author peter
 * @date   2010-4-16
 */
public class Message {

	private String from_name;//发送者
	private String to_name;//接收者
	private String roomname;//聊天者所在房间
	int visiable;//标记是私聊还是密聊
	String ms=null;//发送的消息
	
	public Message()
	{
	
	}
	public Message(String from,String to,String room,String message,int flag)//两者聊天
	{
		this.from_name=from;
		this.to_name=to;
		this.roomname=room;
		this.visiable=flag;//标记为0代表私聊1代表密聊
		this.ms=message;
		System.out.println("message from user: "+from_name+"message: "+ms);
		
	}
	public Message(String from,String room,String message)//群聊
	{
		this.from_name=from;
		this.to_name="所有人";
		this.roomname=room;
		this.ms=message;
		this.visiable=2;//标记为2代表群聊
	}
	public String getFrom_name() {
		return from_name;
	}
	public void setFrom_name(String from_name) {
		this.from_name = from_name;
	}
	public String getTo_name() {
		return to_name;
	}
	public void setTo_name(String to_name) {
		this.to_name = to_name;
	}
	public String getRoomname() {
		return roomname;
	}
	public void setRoomname(String roomname) {
		this.roomname = roomname;
	}
	public int getVisiable() {
		return visiable;
	}
	public void setVisiable(int visiable) {
		this.visiable = visiable;
	}
	public String getMs() {
		return ms;
	}
	public void setMs(String ms) {
		this.ms = ms;
	}
	
}
